import { createAction } from '../utils/redux'
import { PROD_LIST,PROD_ITEM } from '../constants/product'
import { API_PROD_LIST,API_PROD_ITEM } from '../constants/api'

/**
 * 搜索商品
 * @param {*} payload 
 */
export const dispatchSearchProd = payload => createAction({
    url: API_PROD_LIST,
    type: PROD_LIST,
    payload
})
/**
 * 搜索商品
 * @param {*} payload 
 */
export const dispatchProdInfo = payload => createAction({
    url: API_PROD_ITEM,
    type: PROD_ITEM,
    payload
})